
class Interval1D:
    def __init__(self, min, max):
        self.min = min
        self.max = max
        
    def contains(self, v):
        if v>=self.min and v<=self.max:
            return True
        return False

class ValidityInterval:
    def __init__(self, dimensions):
        self.dimensions = dimensions
        self.interval1Ds = []
        
    def contains(self, point):
        for i in range(self.dimensions):
            if not self.interval1Ds[i].contains(point[i]):
                return False
            n = n + 1
        return True
        